<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/h-ui/css/H-ui.min.css"
	rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/h-ui/css/H-ui.admin.css"
	rel="stylesheet" type="text/css" />
<link
	href="${pageContext.request.contextPath }/h-ui/lib/icheck/icheck.css"
	rel="stylesheet" type="text/css" />
<link
	href="${pageContext.request.contextPath }/h-ui/lib/Hui-iconfont/1.0.6/iconfont.css"
	rel="stylesheet" type="text/css" />
<link
	href="${pageContext.request.contextPath }/h-ui/lib/webuploader/0.1.5/webuploader.css"
	rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/h-ui/lib/select2.css"
	rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<style type="text/css">
.inputcheck{width:100px;float:left;}
</style>
<title>修改花型的属性</title>
</head>
<body>
	<div class="pd-20">
		<form id="form" action="../Patterns/UpdateFilter2" method="post" class="form "
			id="update_PattrenFilter_Form">
			<input type="hidden" id="pId" name="pId" value="${parent }">
			
			<c:forEach items="${yushe }" var="fuji">
			<c:if test="${fuji.ptParentId==0 }">
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red">*</span>${fuji.ptName }：</label>
				<div class="formControls col-9">
							<c:forEach items="${yushe }" var="p">
							<c:if test="${p.ptParentId==fuji.ptId }">
							<c:set var="sss" value=""></c:set>
									<c:forEach items="${fn:split(parent1.pMessage2,',')}" var="it">
										<c:if test="${it==p.ptName }">
										<c:set var="sss" value="checked"></c:set>
										</c:if> 
									</c:forEach>
							<div class="inputcheck"><input type="checkbox" ${sss } name="pMessage2" value="${p.ptName }">${p.ptName }</div>
							</c:if>
							</c:forEach>
			
				</div>
				<div class="col-1"> </div>
			</div>
			</c:if>
			</c:forEach>
			<div class="row cl">
				<div class="col-9 col-offset-3">
					<button class="btn btn-primary save" type="submit">保存</button>
					<a class="btn btn-primary" onclick="closethis()">取消</a>
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/icheck/jquery.icheck.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/Validform/5.3.2/Validform.min.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/layer/2.1/layer.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/js/H-ui.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/js/H-ui.admin.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/webuploader/0.1.5/webuploader.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/uploadSingleImg.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/jqthumb/jqthumb.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/tableBtnGroup.js"></script>
	<script type="text/javascript"
		src="${pageContext.request.contextPath }/h-ui/lib/select2.js"></script>
	<script type="text/javascript">
		function closethis() {
			var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
			parent.layer.close(index);
		}
		$(function() {
			var demo=$("#form").Validform({
				tiptype:2,
				label:".label",
				showAllError:true,
				ajaxPost:true,
				callback:function(result){
					 var status=result.msg.status;
					 var desc=result.msg.desc;
					 if(status == 0){
						 
						 var index = parent.layer.getFrameIndex(window.name);
					    	window.parent.location.reload();
					    	parent.layer.close(index);//关闭弹框 
					    	layer.close(index1);
						
					 }
					 }
			});
		});
		
	</script>
</body>
</html>